package com.lotterymanage.dao.impl;

import com.lotterymanage.page.Pagination;

import org.springframework.stereotype.Repository;

import com.lotterymanage.dao.UserDao;
import com.lotterymanage.domain.User;

/**
 * UserDao.
 * @author zhangbin
 * @date Apr 15, 2010
 */
@Repository("userDao")
public class UserDaoImpl extends AbstractDaoImpl implements UserDao {

    /**
     * 添加用户.
     * @param user User
     */
    @SuppressWarnings("unchecked")
    public void insert(final User user) {
        this.getSqlMapClientTemplate().insert("INSERT-USER", user);
    }

    /**
     * 分页查询.
     * @param user User
     * @return list
     */
    public Pagination selectUserPage(final User user) {
        return this.queryForPage("USER-PAGE-COUNT", "USER-PAGE", user);
    }
}
